package com.chendx.model.common.enums;

public enum AppHttpCodeEnum {

    // 成功段0
    SUCCESS(0,"操作成功"),
    // 登录段1~50
    NEED_LOGIN(1,"需要登录后操作"),
    LOGIN_PASSWORD_ERROR(2,"密码错误"),
    // TOKEN50~100
    VCODE_INVALID(3,"验证码错误"),
    PHONE_IS_NOT_REGISTER(4,"未注册"),
    TODAY_SIGNED(5,"今天已签到"),
    SOCRE_ENOUGH(6,"豆不足50"),
    TOKEN_INVALID(50,"无效的TOKEN"),
    TOKEN_EXPIRE(51,"TOKEN已过期"),
    TOKEN_REQUIRE(52,"TOKEN是必须的"),
    // SIGN验签 100~120
    SIGN_INVALID(100,"无效的SIGN"),
    SIG_TIMEOUT(101,"SIGN已过期"),
    // 参数错误 500~1000
    PARAM_REQUIRE(500,"缺少参数"),
    PARAM_INVALID(501,"无效参数"),
    PARAM_IMAGE_FORMAT_ERROR(502,"图片格式有误"),
    SERVER_ERROR(503,"服务器内部错误"),
    // 数据错误 1000~2000
    DATA_EXIST(1000,"数据已经存在"),
    AP_USER_DATA_NOT_EXIST(1001,"ApUser数据不存在"),
    DATA_NOT_EXIST(1002,"数据不存在"),
    CATEGORY_NOT_TEMPLATE(1003,"分类未设置模板"),
    // 数据错误 3000~3500
    NO_OPERATOR_AUTH(3000,"无权限操作"),
    NEED_ADMIND(3001,"需要管理员权限"),
    BAD_COMMENT(1003,"评论有不当言辞"),
    EXIST_PHONE(801,"手机号码已被使用"),
    EXIST_NAME(802,"用户名已被使用"),
    ERROR_CODE(803,"验证码错误"),
    REPEAT_SUBMIT(804,"重复提交"),

    SKU_NOT_EXIST(10100,"商品不存在"),
    SPU_NOT_EXIST(10101,"SPU不存在"),
    SKU_IS_DELETE(10102,"购物车不存在该商品"),
    RECEIVER_IS_ERROR(10103,"收件人信息错误"),
    PREF_NOT_EXIST(10104,"不存在该优惠券或优惠券过期"),
    USER_NOT_PREF(10105,"用户不存在该优惠券"),
    ORDER_NOT_EXIST(10106,"订单不存在"),
    ORDER_PAYED(10107,"订单已支付"),
    ORDER_COMPLETE(10108,"订单已完成"),
    ORDER_CLOSED(10109,"订单已关闭"),
    ORDER_PAY_FAIL(10110,"订单支付失败"),
    IS_FOCUS(10111,"已关注"),
    NO_FOCUS(10112,"未关注"),
    IS_COLLECT(10113,"已收藏"),
    NO_COLLECT(10114,"未收藏"),
    ORDER_ERROR(10115,"订单错误"),
    ORDER_NO_TIME_OUT(10116,"订单暂未超时"),
    ORDER_DO_NOT_DELETE(10117,"订单不能删除"),
    ORDER_NOT_PAY(10118,"订单未支付"),
    RETURNED(10119,"已退款"),
    RETURNING(10120,"已经申请退款"),
    RETURN_ORDER_IS_DISPOSE(10120,"退款已被处理"),
    SECKILL_GOODS_NO_EXIST(10121,"抢购商品不存在"),
    NO_TIME_TO_SECKILL(10122,"未到抢购时间"),
    END_SECKILLED(10123,"抢购已经结束"),
    NO_STOCK_COUNT(10124,"库存不足"),
    REPEAT_SECKILL(10125,"重复抢单" ),
    SOLD_OUT(10126,"已售罄" ), NOT_FOUND_ERROR(10127,"没有对应的抢购信息"), GOODS_RETURNED(10128,"订单已退货"),
    NO_NOTICE(10129,"没有新的消息");

    int code;
    String errorMessage;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.errorMessage = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
}
